home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / libsrc / stdio / ftell.c < prev    next >
C/C++ Source or Header  |  1999-01-01  |  244b  |  14 lines

  1. #include <stdio.h>
  2.  
  3. #include <proto/dos.h>
  4.  
  5. long ftell(FILE *f)
  6. {
  7.     long offset;
  8.     offset=Seek((BPTR)f->filehandle,0L,0L);
  9.     if(f->flags&_READ) offset-=f->count;
  10.     if(f->flags&_WRITE) offset+=f->bufsize-f->count;
  11.     return(offset);
  12. }
  13.  
  14.